package com.oasys.service;

import com.oasys.entity.dto.RoleUserDto;
import com.oasys.entity.po.RolePo;
import com.oasys.entity.vo.RoleUserVo;
import com.oasys.entity.vo.RoleVo;
import com.oasys.utils.ResponseResult;

import java.util.List;

/**
 * @Description: TODO
 * @Author: mis_wu
 * @Date: 2022/5/26
 **/
public interface RoleService {

    /**
     * 获取角色对应用户信息
     * @return
     */
    List<RoleUserDto> getRoleUserInfo();

    /**
     * 保存菜单
     * @param roleUserVo
     * @return
     */
    ResponseResult<Boolean> saveMenuRoleInfo(RoleUserVo roleUserVo);

    /**
     * 获取角色编码
     * @param userId id
     * @return int
     */
    Integer getRoleNo(Long userId);

    /**
     * 获取所有角色
     * @param roleName name
     * @return list
     */
    ResponseResult<List<RolePo>> getAllRoleInfo(String roleName);

    /**
     * add role
     * @param roleName name
     * @return boolean
     */
    ResponseResult<Boolean> addRole(String roleName);

    /**
     * 修改角色
     * @param roleVo vo
     * @return boolean
     */
    ResponseResult<Boolean> updateRole(RoleVo roleVo);

    /**
     * delete
     * @param roleId id
     * @return boolean
     */
    ResponseResult<Boolean> delRole(Long roleId);
}
